//
//  TeamListCell.m
//  easystudy
//
//  Created by kane on 16/8/30.
//  Copyright © 2016年 kane. All rights reserved.
//

#import "TeamListCell.h"

@interface TeamListCell ()
{
    __weak IBOutlet UIImageView *avatarIV;
    __weak IBOutlet UILabel *doctorNameLbl;
    __weak IBOutlet UILabel *doctorPostionLbl;
    __weak IBOutlet UILabel *doctorScopeLbl;
    __weak IBOutlet UILabel *doctorDescLbl;
}

@end

@implementation TeamListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setupDoctorInfo:(NSDictionary *)info
{
    NSString *url = info[@"avatar"] && [info[@"avatar"] isKindOfClass:[NSString class]] ? info[@"avatar"]  : @"";;
    [avatarIV setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",FileURL,url]] placeholderImage:[UIImage imageNamed:@"defaultDoctor"]];
    doctorNameLbl.text = info[@"name"];
    doctorPostionLbl.text = info[@"position"];
    doctorScopeLbl.text = info[@"goodat"];
    doctorDescLbl.text = info[@"brief"];
    doctorDescLbl.numberOfLines = 0;
    [doctorDescLbl sizeToFit];
}

@end
